1. Field of the Invention
The present invention relates to an image processing technique and, more particularly, to an edge emphasis technique of a digital image.
2. Description of the Related Art
A copying machine which optically scans a document image and prints a scanned image on a print medium such as a paper sheet or the like is known. In general, the edge of an image optically scanned by a scanning unit (scanner) of a copying machine is smoother than that of a document image. For this reason, an image with poor sharpness is output when the scanned image is printed on a print medium intact. Hence, a technique for applying edge emphasis processing to image data obtained after scanning a document image is known. However, in general, upon applying the edge emphasis processing, moiré is emphasized together. To prevent this problem, the following technique is known. That is, this technique uses image region separation which separates scanned image data into two regions, that is, a text region and a halftone region, and applies edge emphasis processing to the text region and smoothing processing to the halftone region to attain enhancement of sharpness and a reduction of moiré at the same time. However, if a determination error occurs in image region separation, the smoothing processing may be applied to a text region, and the edge emphasis may be applied to a halftone region, thus deteriorating an image. Depending on the precision of image region separation, for example, a part of a character may be determined to be a text region, and the remaining part of the character may be determined to be a halftone region. In this case, switching of the edge emphasis and smoothing processes occurs in one character. Such switching considerably impairs an image.
Japanese Patent No. 3099354 (reference 1) discloses a technique that continuously sets an edge emphasis level according to an edge amount. With this technique, adaptive edge emphasis according to the edge amount can be applied and can eliminate image deterioration. Japanese Patent Laid-Open No. 2002-77623 (reference 2) discloses a technique that adaptively sets an edge emphasis level according to an edge amount, and disables the adaptive setting for a halftone region. With this technique, adaptive edge emphasis according to the edge amount can be applied, and edge emphasis of the halftone region can be reduced. Furthermore, Japanese Patent No. 3472094 (reference 3) discloses a technique that separates an image into multiple regions including a text region, photo region, and halftone region according to the degree of coupling and density difference of black pixels. With this technique, more flexible image region separation can be implemented.
In general, upon applying the edge emphasis processing, overshoot and undershoot occur at an edge part. FIG. 14 illustrates the edge emphasis processing result using an unsharp mask that adjusts an emphasis level according to an edge amount. Referring to FIG. 14, white dots 1401 represent brightness levels of an original image at respective pixel positions, and black dots 1402 represent brightness levels at the respective pixel positions, which are converted by:S′=S+K*(S−U)  (1)where S is an image signal of a pixel of interest, U is the weighted average value of the image signal around the pixel of interest, and K is a value generated based on the type and edge amount of an image which is separated by image region separation. In FIG. 14, two pixels each before and after the pixel of interest are used as reference pixels, and equation (1) is applied for the sake of descriptive convenience. As shown in FIG. 14, overshoot and undershoot occur in the edge shape after the edge emphasis. When this processing result is output using a high-resolution, multi-gradation output apparatus, even overshoot and undershoot are accurately expressed, and an image is output with a bordered edge part.
Since a conventional output apparatus has a low print resolution, overshoot and undershoot of the edge part are inconspicuous, and a satisfactory output image is obtained. However, upon advent of high-resolution, multi-gradation output apparatuses in recent years, overshoot and undershoot of the edge part are recognized as bordering of the edge part, thus leading to image deterioration.
Hence, Japanese Patent No. 2620368 (reference 4) discloses an edge processing technique that replaces the pixel of interest by neighbor pixels. More specifically, it is checked if the pixel of interest is convex upward or downward, or has any other shape in the distribution pattern of an image signal. Based on the checking result, the following processes are done: if the pixel of interest is convex upward, the pixel of interest is replaced by a maximum value in a neighbor region; if the pixel of interest is convex downward, the pixel of interest is replaced by a minimum value in the neighbor region; otherwise, the pixel of interest is replaced by the average value or the value of the pixel of interest.
However, in the technique disclosed in reference 1, an edge emphasis level is set focusing on the fluctuation amount of an edge (edge amount). For this reason, a large edge emphasis level is set for a halftone region having the same fluctuation amount as a text region, and moiré is also emphasized, thus deteriorating an image.
In the technique disclosed in reference 2, an edge emphasis level is similarly set focusing on an edge amount. However, since this technique also focuses on a halftone cycle (fluctuation count), and disables the adaptive edge emphasis level setting based on the halftone cycle (fluctuation count), edge emphasis on a halftone region can be stopped, thus reducing moiré emphasis. However, although the edge emphasis level is adaptively set up to a certain fluctuation count in accordance with the edge amount, when the certain fluctuation count is reached, the edge emphasis level setting is disabled irrespective of the edge amount. For this reason, switching of the processes occurs at the certain fluctuation count, thus deteriorating an image.
The technique disclosed in reference 3 focuses on a fluctuation count, since the edge amount of an image signal decreases with increasing degree of coupling of black pixels. Also, this technique focuses on the edge amount since the density difference of black pixels is the edge amount of an image signal. Three or more values are set for both the fluctuation count and edge amount to improve separation precision upon separating an image region into multiple regions including at least a text region, photo region, and halftone region by image region separation. However, adaptive separation according to the fluctuation count and edge amount, and adaptive processing intensities are not applied, and adaptive processes cannot be made according to the fluctuation count or edge amount. Hence, switching of the processes occurs, deteriorating an image and thus posing a problem.
In the technique disclosed in reference 4, the edge emphasis effect can be obtained by setting a region other than an upward or downward convex region. However, since the same processing is also applied to a halftone region, the aforementioned moiré emphasis is done together, thus posing a problem.